#!/usr/bin/env bash

set -e

uname -a

case "$OSTYPE" in
    linux*)
        cat /proc/cpuinfo
        cat /proc/meminfo
        ;;
    freebsd*)
        sysctl hw.machine hw.machine_arch hw.model hw.ncpu
        sysctl hw.{phys,user,real}mem
        ;;
    darwin*)
        system_profiler SPHardwareDataType
        ;;
esac

set -x

git --version
rsync --version

# Older versions of par2 don't support -V, but it'll still show the
# version when it fails.
if command -v par2; then par2 -V || true; fi

df -h
mount

id
pwd
